package com.groupbuying.orderproducer.connector;

import com.groupbuying.orderproducer.utils.apiresult.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @anthor zmlmagic
 * @date 2019/4/17 4:47 PM
 * @company 蒙泰互联网公司
 * @des 备注说明
 **/

@Service
@FeignClient(name = "bus-store")
public interface StoreFeign {

    @GetMapping(value = "/counter/getStoreShopByCounterId")
    Map<String, String> getStoreShopByCounterId(@RequestParam Map<String, Object> params);

    @PostMapping("/api/getCounterNameByCustomerUuid")
    String getCounterNameByCustomerUuid(@RequestParam("customerUuid") String customerUuid);

    /**
     * 通过收银台ID确认收银台商铺有效
     *
     * @param params
     * @return
     */
    @PostMapping("/counter/checkCounter")
    ApiResult checkCounter(@RequestParam Map<String, Object> params);
}